package com.qcby.dao;

import java.sql.Timestamp;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.qcby.model.MovieComment;
import com.qcby.model.dto.MovieCommentShowVo;
import com.qcby.model.dto.MovieCommentShowVo2;
import com.qcby.model.dto.MovieCommentShowVo3;
import com.qcby.query.MovieCommentQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface MovieCommentMapper extends BaseDao<MovieCommentQuery, MovieComment> {

    List<MovieCommentShowVo> selectCommentByMid(@Param("mid") Integer mid,
                                                @Param("orderBy") String orderBy,
                                                @Param("startNum") Integer startNum,
                                                @Param("pageSize") Integer pageSize);

    Integer selectCommentByMidCount(@Param("mid") Integer mid);

    List<MovieCommentShowVo2> selectCommentByUid(@Param("uid") Integer uid,
                                                 @Param("orderBy") String orderBy,
                                                 @Param("startNum") Integer startNum,
                                                 @Param("pageSize") Integer pageSize);

    Integer selectCommentByUidCount(@Param("uid") Integer uid);

    Integer insertCommon(@Param("uid") Integer uid,
                         @Param("mid") Integer mid,
                         @Param("commentContent") String commentContent,
                         @Param("commentAt") Timestamp commentAt,
                         @Param("commentScore") Integer commentScore);

    List<MovieCommentShowVo3> selectCommentAdmin(
        @Param("uid") Integer uid,
        @Param("mid") Integer mid,
        @Param("orderBy") String orderBy,
        @Param("startNum") Integer startNum,
        @Param("pageSize") Integer pageSize);

    Integer selectCommentAdminCount(@Param("uid") Integer uid,
        @Param("mid") Integer mid);
}
